package org.example.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class Food {
    @Column
    @Id
    private Integer foodId;
    @Column
    private String foodName;
    @Column
    private String foodExplain;
    @Column
    private String foodImg;
    @Column
    private Double foodPrice;
    @Column
    private Integer businessId;
    @Column
    private String remarks;



//    //一对多
//    @OneToMany(mappedBy = "food", //orderdetailet里面存在orders成员变量
//            cascade = CascadeType.ALL )//级联 增删改查
////    @JsonIgnoreProperties(value = {"food"})//避免循环引用
//    @JsonIgnore
//    private List<Orderdetailet> list;
//
//    //一对多
//    @OneToMany(mappedBy = "food", //orderdetailet里面存在orders成员变量
//            cascade = CascadeType.ALL )//级联 增删改查
////    @JsonIgnoreProperties(value = {"food"})//避免循环引用
//    @JsonIgnore
//    private List<Cart> cartList;

}
